package cn.edu.scau.cmi.linhongxin.composite.cosistent;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javafx.beans.property.SimpleStringProperty;

public abstract class Organization {
	private SimpleStringProperty name;
	protected List<Organization> list;
	
	public Organization(String name) {
		this.name = new SimpleStringProperty(name);
		list = new ArrayList<Organization>();
	}
	
	public void setName(String name) {
		this.name.set(name);
	}
	
	public String getName() {
		return name.get();
	}
	
	public abstract void add(Organization o);
	public abstract void remove(Organization o);
	public abstract Organization getChild(int index);
	public abstract Iterator<Organization> elements();
}
